﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

namespace RSERV.Web.DAO
{
    public static class Connection
    {
        public static string CreateNewConnection(string pass, string login, string server, string db)
        {
            SqlConnectionStringBuilder scsb = new SqlConnectionStringBuilder();
            scsb.DataSource = server;
            scsb.UserID = login;
            scsb.Password = pass;
            scsb.MultipleActiveResultSets = true;
            scsb.InitialCatalog = db;   
            return scsb.ConnectionString;
        }
    }
}